package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysCheckMapper;
import com.ruoyi.system.domain.SysCheck;
import com.ruoyi.system.service.ISysCheckService;

/**
 * 检查费用Service业务层处理
 *
 * @author ruoyi
 * @date 2022-11-11
 */
@Service
public class SysCheckServiceImpl implements ISysCheckService
{
    @Autowired
    private SysCheckMapper sysCheckMapper;

    /**
     * 查询检查费用
     *
     * @param checkId 检查费用主键
     * @return 检查费用
     */
    @Override
    public SysCheck selectSysCheckByCheckId(Long checkId)
    {
        return sysCheckMapper.selectSysCheckByCheckId(checkId);
    }

    /**
     * 查询检查费用列表
     *
     * @param sysCheck 检查费用
     * @return 检查费用
     */
    @Override
    public List<SysCheck> selectSysCheckList(SysCheck sysCheck)
    {
        return sysCheckMapper.selectSysCheckList(sysCheck);
    }

    /**
     * 新增检查费用
     *
     * @param sysCheck 检查费用
     * @return 结果
     */
    @Override
    public int insertSysCheck(SysCheck sysCheck)
    {
        sysCheck.setCreateTime(DateUtils.getNowDate());
        return sysCheckMapper.insertSysCheck(sysCheck);
    }

    /**
     * 修改检查费用
     *
     * @param sysCheck 检查费用
     * @return 结果
     */
    @Override
    public int updateSysCheck(SysCheck sysCheck)
    {
        sysCheck.setUpdateTime(DateUtils.getNowDate());
        return sysCheckMapper.updateSysCheck(sysCheck);
    }

    /**
     * 批量删除检查费用
     *
     * @param checkIds 需要删除的检查费用主键
     * @return 结果
     */
    @Override
    public int deleteSysCheckByCheckIds(Long[] checkIds)
    {
        return sysCheckMapper.deleteSysCheckByCheckIds(checkIds);
    }

    /**
     * 删除检查费用信息
     *
     * @param checkId 检查费用主键
     * @return 结果
     */
    @Override
    public int deleteSysCheckByCheckId(Long checkId)
    {
        return sysCheckMapper.deleteSysCheckByCheckId(checkId);
    }
}
